# $Id: PKGBUILD 89903 2013-05-05 14:47:31Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=arch-wiki-docs
pkgver=20130505
pkgrel=1
pkgdesc="Documentation from wiki.archlinux.org"
arch=('any')
makedepends=('wget' 'perl' 'perl-json-xs')
url="http://wiki.archlinux.org"
license=('FDL')
options=('docs' '!strip')
source=("get.sh"
	"index.pl"
	"filter.pl")
md5sums=('7f9aec77fbf319aa8247149319ff7f7c'
         'dddb4258bd93acc1a0102bfee3e077f0'
         '6430f9db1d0f0be5999e2c247f4ca2a1')

build() {
  bash $srcdir/get.sh $srcdir $srcdir/pages
  (cd $srcdir/pages && perl -w $srcdir/filter.pl)
}

package() {
  mkdir -p $pkgdir/usr/share/doc/arch-wiki/html
  cp -r $srcdir/pages/* $pkgdir/usr/share/doc/arch-wiki/html/
}
